<script>
	export default {
		globalData: {
			url: "https://zx.bjfen.com/api/",
			type:1
		},
		methods: {
			isBlank: function (str) {
				if (Object.prototype.toString.call(str) === '[object Undefined]') {//空
				  return true
				} else if (
				  Object.prototype.toString.call(str) === '[object String]' ||
				  Object.prototype.toString.call(str) === '[object Array]' || Object.prototype.toString.call(str) === '[object Number]') { //字条串或数组
				  return str.length == 0 ? true : false
				} else if (Object.prototype.toString.call(str) === '[object Object]') {
				  return JSON.stringify(str) == '{}' ? true : false
				} else {
				  return true
				}
			},
			error_msg(msg){
				uni.showToast({
				    title: msg,
					icon:'none',
				    duration: 1500
				});
				setTimeout(function(){
					var pages = getCurrentPages(); //当前页面栈
					if (pages.length > 1){
						uni.navigateBack({
							delta: 1
						});
					}else{
						uni.reLaunch({
							url: '/pages/index/index'
						});
					}
				},1500);
				return false;
			}
		},
		onLaunch: function() {
			
		},
		onShow: function() {
			/*var t=uni.getStorageSync('js_type');
			if(t!=2){
				uni.setStorageSync('js_type',1);
			}*/
		},
		onHide: function() {
		}
	}
</script>

<style>
	/*每个页面公共css */
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.xiaxia{width:15px;height:15px;margin-top: 16px;}
	.fenxian{width:100%;background-color: #f3f3f3;}
	.hg1{height:1px;}
	.hg2{height:2px;}
	.hg3{height:3px;}
	.hg4{height:4px;}
	.hg5{height:5px;}
	.hg6{height:6px;}
	.hg7{height:7px;}
	.hg8{height:8px;}
	.hg9{height:9px;}
	.hg10{height:10px;}
	view{font-size: 0.85rem;color:#333;}
	.clear{clear: both;}
	uni-toast,uni-modal,.uni-picker-container,.uni-page-refresh,uni-actionsheet .uni-actionsheet{
		z-index: 9999 !important;
	}
	
	.gaodu{width:100%;height:50px;}
</style>
